<div id="RightCol">
<?
if($strStyleSheet == TRUE)
	echo "<table class='Normal' border='0' align='left' width='600'>";
?>
	<div class="Report">
	<tr>
		<td align='left' colspan='5'>
    		<h3>Order With Cost Report <?php echo ( date("H:i l, d F Y") );?></h3>
    	</td>
    </tr>
    
	<tr>
		<td width='50'>
			Order Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
		<td>	
			Unit Price&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
		<td>
			Cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>		
		
		<td>
			Quantity&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
		<td>
			Total Cost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
	</tr>
	<?php
	$intPrevOrderYear = 0;
	$strOrderStatus = "";
	//intOrderStatus = 77;
	/* $qryOrderGroupedByProduct = new MySqlResults */
	include (MODULE . "/action/qrySelectOrder_Status_ProductId_Grouped.php");
	//echo $strSQL;
	// If Category appears again in the loop create / populate the submenu
	// If Category and Sub-category are the same don't create sub-menus
	do {
		$intOrderYear = $qryOrderGroupedByProduct->myrow["OrderYear"];   
		$strOrderStatus = $qryOrderGroupedByProduct->myrow["OrderStatus"];?>
		<tr>
			<td>
				<?php echo ReformatFromMySQLDate($qryOrderGroupedByProduct->myrow["OrderDate"])?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
			<td align="right">				
				<?php echo $qryOrderGroupedByProduct->myrow["Product"]?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
			<td align="right">
				<?=CURRENCY.number_format($qryOrderGroupedByProduct->myrow["CostPrice"],2);?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>		
			
			<td align="right">
				<?=number_format($qryOrderGroupedByProduct->myrow["Quantity"]);?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
			<td align="right">
				<?=CURRENCY.number_format($qryOrderGroupedByProduct->myrow["CostPrice"] * $qryOrderGroupedByProduct->myrow["Quantity"],2);?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
		</tr>

		</div>
		<?php
		$intPrevOrderYear = $intOrderYear;	 
		$strPrevOrderStatus	= $strOrderStatus;
	 } while ($qryOrderGroupedByProduct->myrow = mysql_fetch_array($qryOrderGroupedByProduct->result));
	 
	if($strStyleSheet == TRUE){
   		echo "</table>";
	}
	?>

</div>
